<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>孕育宝典 - 体重管理</title>
        <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
        <style>
            body {
                font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
                background-color: #f5f5f5;
                color: #333333;
                margin: 0;
                padding: 0;
            }
            .device-container {
                width: 390px;
                height: 844px;
                overflow: hidden;
                position: relative;
                background-color: #ffffff;
            }
            .status-bar {
                height: 44px;
                background-color: #ffffff;
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 0 20px;
                font-size: 14px;
                font-weight: 600;
            }
            .header {
                background-color: #ffffff;
                padding: 12px 16px 8px;
                display: flex;
                justify-content: space-between;
                align-items: center;
                border-bottom: 1px solid #f0f0f0;
            }
            .nav-bar {
                height: 60px;
                background-color: #ffffff;
                position: absolute;
                bottom: 0;
                width: 100%;
                display: flex;
                justify-content: space-around;
                align-items: center;
                border-top: 1px solid #f0f0f0;
            }
            .nav-item {
                display: flex;
                flex-direction: column;
                align-items: center;
                color: #666666;
                font-size: 10px;
            }
            .nav-item.active {
                color: #ff9fb5;
            }
            .main-content {
                height: calc(844px - 44px - 60px - 56px);
                overflow-y: auto;
                padding: 16px;
                background-color: #f9f9f9;
            }
            .card {
                background-color: #ffffff;
                border-radius: 12px;
                padding: 16px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
                margin-bottom: 16px;
            }
            .card-title {
                font-size: 16px;
                font-weight: 600;
                color: #333;
                margin-bottom: 12px;
                display: flex;
                align-items: center;
            }
            .card-title i {
                margin-right: 8px;
                color: #ff9fb5;
            }
            .form-group {
                margin-bottom: 16px;
            }
            .form-label {
                display: block;
                font-size: 14px;
                font-weight: 500;
                color: #333;
                margin-bottom: 6px;
            }
            .form-input {
                width: 100%;
                padding: 10px 12px;
                border: 1px solid #e2e8f0;
                border-radius: 8px;
                font-size: 14px;
                transition: all 0.2s;
            }
            .form-input:focus {
                outline: none;
                border-color: #ff9fb5;
                box-shadow: 0 0 0 3px rgba(255, 159, 181, 0.1);
            }
            .button-primary {
                background-color: #ff9fb5;
                color: white;
                border: none;
                border-radius: 8px;
                padding: 12px 0;
                font-size: 16px;
                font-weight: 500;
                width: 100%;
                cursor: pointer;
                transition: all 0.2s ease;
            }
            .button-secondary {
                background-color: #f5f5f5;
                color: #666;
                border: 1px solid #ddd;
                border-radius: 8px;
                padding: 12px 0;
                font-size: 16px;
                font-weight: 500;
                width: 100%;
                cursor: pointer;
                transition: all 0.2s ease;
            }
            .weight-stat {
                text-align: center;
                padding: 16px 0;
            }
            .weight-value {
                font-size: 36px;
                font-weight: 700;
                color: #333;
                margin-bottom: 4px;
            }
            .weight-label {
                font-size: 14px;
                color: #666;
            }
            .tabs {
                display: flex;
                background-color: #f5f5f5;
                border-radius: 8px;
                padding: 4px;
                margin-bottom: 16px;
            }
            .tab {
                flex: 1;
                text-align: center;
                padding: 8px 0;
                font-size: 14px;
                border-radius: 6px;
                cursor: pointer;
                transition: all 0.2s ease;
            }
            .tab.active {
                background-color: #fff;
                color: #ff9fb5;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            }
        </style>
    </head>
    <body>
        <div class="device-container">
            <!-- iOS状态栏 -->
            <div class="status-bar">
                <span>9:41</span>
                <div class="flex items-center">
                    <i class="fas fa-signal mr-1"></i>
                    <i class="fas fa-wifi mr-1"></i>
                    <i class="fas fa-battery-full"></i>
                </div>
            </div>

            <!-- 页面头部 -->
            <div class="header">
                <div class="flex items-center">
                    <i class="fas fa-arrow-left mr-4"></i>
                    <h1 class="text-lg font-medium">体重管理</h1>
                </div>
                <div class="flex gap-3">
                    <i class="fas fa-chart-line"></i>
                </div>
            </div>

            <!-- 主内容区 -->
            <div class="main-content">
                <!-- 体重概览 -->
                <div class="card">
                    <div class="card-title">
                        <i class="fas fa-weight"></i>
                        <span>体重概览</span>
                    </div>

                    <!-- 当前体重 -->
                    <div class="weight-stat">
                        <div class="weight-value">62.3 <span class="text-sm">公斤</span></div>
                        <div class="weight-label">当前体重</div>
                        <div class="text-xs text-gray-500 mt-1">最后更新: 2023-07-20</div>
                    </div>

                    <!-- 体重指标 -->
                    <div class="grid grid-cols-3 gap-3 mb-4">
                        <div class="bg-gray-50 p-3 rounded-lg text-center">
                            <div class="text-xs text-gray-500">孕期增重</div>
                            <div class="font-medium mt-1">+4.8公斤</div>
                            <div class="text-xs text-green-500">标准范围</div>
                        </div>
                        <div class="bg-gray-50 p-3 rounded-lg text-center">
                            <div class="text-xs text-gray-500">目标体重</div>
                            <div class="font-medium mt-1">65.5公斤</div>
                            <div class="text-xs text-gray-500">孕期末</div>
                        </div>
                        <div class="bg-gray-50 p-3 rounded-lg text-center">
                            <div class="text-xs text-gray-500">BMI指数</div>
                            <div class="font-medium mt-1">22.8</div>
                            <div class="text-xs text-green-500">正常</div>
                        </div>
                    </div>

                    <!-- 孕期体重增长进度 -->
                    <div class="bg-blue-50 p-3 rounded-lg">
                        <div class="flex justify-between mb-2">
                            <div class="text-xs font-medium text-blue-800">孕期体重增长进度</div>
                            <div class="text-xs text-blue-800">24周 / 40周</div>
                        </div>

                        <div class="relative h-4 bg-blue-100 rounded-full overflow-hidden mb-2">
                            <div class="absolute top-0 left-0 h-full bg-blue-500 rounded-full" style="width: 60%"></div>
                        </div>

                        <div class="flex justify-between text-xs text-blue-800">
                            <div>孕前：57.5公斤</div>
                            <div>当前：62.3公斤</div>
                            <div>目标：65.5公斤</div>
                        </div>
                    </div>
                </div>

                <!-- 记录体重 -->
                <div class="card">
                    <div class="card-title">
                        <i class="fas fa-plus-circle"></i>
                        <span>记录体重</span>
                    </div>

                    <form>
                        <div class="form-group">
                            <label class="form-label">日期</label>
                            <input type="date" class="form-input" value="2023-07-20" />
                        </div>

                        <div class="form-group relative">
                            <label class="form-label">体重 (公斤)</label>
                            <input
                                type="number"
                                step="0.1"
                                class="form-input pr-16"
                                placeholder="输入体重"
                                value="62.3"
                            />
                            <div class="absolute right-3 top-10 text-gray-400">公斤</div>
                        </div>

                        <div class="form-group">
                            <label class="form-label">备注 (可选)</label>
                            <input type="text" class="form-input" placeholder="添加备注，如饮食情况、运动等" />
                        </div>

                        <button class="button-primary mt-4">保存记录</button>
                    </form>
                </div>

                <!-- 体重变化图表 -->
                <div class="card">
                    <div class="card-title">
                        <i class="fas fa-chart-line"></i>
                        <span>体重变化趋势</span>
                    </div>

                    <!-- 时间范围选择 -->
                    <div class="tabs mb-4">
                        <div class="tab">月</div>
                        <div class="tab active">季度</div>
                        <div class="tab">孕期</div>
                    </div>

                    <!-- 图表区域 -->
                    <div style="height: 200px; position: relative">
                        <!-- Y轴 -->
                        <div
                            style="
                                position: absolute;
                                top: 0;
                                left: 0;
                                bottom: 20px;
                                width: 30px;
                                display: flex;
                                flex-direction: column;
                                justify-content: space-between;
                                align-items: flex-end;
                                padding-right: 5px;
                            "
                        >
                            <div class="text-xs text-gray-500">68</div>
                            <div class="text-xs text-gray-500">66</div>
                            <div class="text-xs text-gray-500">64</div>
                            <div class="text-xs text-gray-500">62</div>
                            <div class="text-xs text-gray-500">60</div>
                            <div class="text-xs text-gray-500">58</div>
                        </div>

                        <!-- 图表区域 -->
                        <div
                            style="
                                position: absolute;
                                top: 0;
                                left: 30px;
                                right: 0;
                                bottom: 20px;
                                border-left: 1px solid #eee;
                                border-bottom: 1px solid #eee;
                            "
                        >
                            <!-- 推荐范围区域 -->
                            <div
                                style="
                                    position: absolute;
                                    left: 0;
                                    right: 0;
                                    top: 20%;
                                    height: 40%;
                                    background-color: rgba(154, 230, 180, 0.2);
                                    border-top: 1px dashed #68d391;
                                    border-bottom: 1px dashed #68d391;
                                "
                            ></div>

                            <!-- 网格线 -->
                            <div
                                style="
                                    position: absolute;
                                    left: 0;
                                    right: 0;
                                    top: 20%;
                                    height: 1px;
                                    background-color: rgba(0, 0, 0, 0.03);
                                "
                            ></div>
                            <div
                                style="
                                    position: absolute;
                                    left: 0;
                                    right: 0;
                                    top: 40%;
                                    height: 1px;
                                    background-color: rgba(0, 0, 0, 0.03);
                                "
                            ></div>
                            <div
                                style="
                                    position: absolute;
                                    left: 0;
                                    right: 0;
                                    top: 60%;
                                    height: 1px;
                                    background-color: rgba(0, 0, 0, 0.03);
                                "
                            ></div>
                            <div
                                style="
                                    position: absolute;
                                    left: 0;
                                    right: 0;
                                    top: 80%;
                                    height: 1px;
                                    background-color: rgba(0, 0, 0, 0.03);
                                "
                            ></div>

                            <!-- 体重曲线 -->
                            <svg style="position: absolute; top: 0; left: 0; width: 100%; height: 100%">
                                <path
                                    d="M20,150 L50,145 L80,140 L110,135 L140,125 L170,115 L200,105 L230,100 L260,90 L290,85"
                                    fill="none"
                                    stroke="#ff9fb5"
                                    stroke-width="2"
                                />

                                <!-- 数据点 -->
                                <circle cx="20" cy="150" r="4" fill="#ff9fb5" />
                                <circle cx="50" cy="145" r="4" fill="#ff9fb5" />
                                <circle cx="80" cy="140" r="4" fill="#ff9fb5" />
                                <circle cx="110" cy="135" r="4" fill="#ff9fb5" />
                                <circle cx="140" cy="125" r="4" fill="#ff9fb5" />
                                <circle cx="170" cy="115" r="4" fill="#ff9fb5" />
                                <circle cx="200" cy="105" r="4" fill="#ff9fb5" />
                                <circle cx="230" cy="100" r="4" fill="#ff9fb5" />
                                <circle cx="260" cy="90" r="4" fill="#ff9fb5" />
                                <circle cx="290" cy="85" r="4" fill="#ff9fb5" />
                            </svg>
                        </div>

                        <!-- X轴 -->
                        <div
                            style="
                                position: absolute;
                                bottom: 0;
                                left: 30px;
                                right: 0;
                                height: 20px;
                                display: flex;
                                justify-content: space-between;
                                align-items: center;
                                padding: 0 10px;
                            "
                        >
                            <div class="text-xs text-gray-500">4月</div>
                            <div class="text-xs text-gray-500">5月</div>
                            <div class="text-xs text-gray-500">6月</div>
                            <div class="text-xs text-gray-500">7月</div>
                        </div>
                    </div>

                    <div class="text-center text-xs text-gray-500 mt-3">绿色区域为推荐体重增长范围</div>
                </div>

                <!-- 历史记录 -->
                <div class="card mb-8">
                    <div class="card-title">
                        <i class="fas fa-history"></i>
                        <span>历史记录</span>
                    </div>

                    <!-- 记录列表 -->
                    <div class="divide-y divide-gray-100">
                        <div class="py-3 flex justify-between items-center">
                            <div>
                                <div class="text-sm font-medium">今天</div>
                                <div class="text-xs text-gray-500">2023-07-20</div>
                            </div>
                            <div class="text-center">
                                <div class="text-sm font-medium">62.3<span class="text-xs ml-1">公斤</span></div>
                                <div class="text-xs text-green-500">+0.2公斤</div>
                            </div>
                        </div>

                        <div class="py-3 flex justify-between items-center">
                            <div>
                                <div class="text-sm font-medium">上周</div>
                                <div class="text-xs text-gray-500">2023-07-13</div>
                            </div>
                            <div class="text-center">
                                <div class="text-sm font-medium">62.1<span class="text-xs ml-1">公斤</span></div>
                                <div class="text-xs text-green-500">+0.3公斤</div>
                            </div>
                        </div>

                        <div class="py-3 flex justify-between items-center">
                            <div>
                                <div class="text-sm font-medium">两周前</div>
                                <div class="text-xs text-gray-500">2023-07-06</div>
                            </div>
                            <div class="text-center">
                                <div class="text-sm font-medium">61.8<span class="text-xs ml-1">公斤</span></div>
                                <div class="text-xs text-green-500">+0.2公斤</div>
                            </div>
                        </div>

                        <div class="py-3 flex justify-between items-center">
                            <div>
                                <div class="text-sm font-medium">三周前</div>
                                <div class="text-xs text-gray-500">2023-06-29</div>
                            </div>
                            <div class="text-center">
                                <div class="text-sm font-medium">61.6<span class="text-xs ml-1">公斤</span></div>
                                <div class="text-xs text-yellow-500">+0.5公斤</div>
                            </div>
                        </div>
                    </div>

                    <button
                        class="mt-4 w-full py-2 text-sm text-center text-gray-500 border border-gray-200 rounded-lg"
                    >
                        查看更多记录
                    </button>
                </div>
            </div>

            <!-- 底部导航栏 -->
            <div class="nav-bar">
                <div class="nav-item">
                    <i class="fas fa-home text-xl mb-1"></i>
                    <span>首页</span>
                </div>
                <div class="nav-item active">
                    <i class="fas fa-notes-medical text-xl mb-1"></i>
                    <span>记录</span>
                </div>
                <div class="nav-item">
                    <i class="fas fa-book-medical text-xl mb-1"></i>
                    <span>知识库</span>
                </div>
                <div class="nav-item">
                    <i class="fas fa-user-friends text-xl mb-1"></i>
                    <span>伴侣空间</span>
                </div>
                <div class="nav-item">
                    <i class="fas fa-user text-xl mb-1"></i>
                    <span>我的</span>
                </div>
            </div>
        </div>
    </body>
</html>
